import { Routes, RouterModule }  from '@angular/router';
import { Productmanagement } from './productmanagement.component';
import { Devices } from './components/devices/devices.component';
import {Devinfo} from './components/devinfo/devinfo.component';
import { Fault } from './components/fault/fault.component';
import { Faultdetail } from './components/faultdetail/faultdetail.component';
import { Maintenance } from './components/maintenance/maintenance.component';

// noinspection TypeScriptValidateTypes
const routes: Routes = [
  {
    path: '',
    component: Productmanagement,
    children: [
     
      { path: 'devices', component:Devices },
      { path: 'devices/devinfo/:deviceId', component: Devinfo },
      { path: 'fault', component: Fault },
      { path: 'fault/faultdetail/:faultId', component: Faultdetail },
      { path: 'maintenance', component: Maintenance }     
      
    ]
  }
];

export const routing = RouterModule.forChild(routes);
